<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/h-ui.admin/css/style.css" />

<!--控制 input框 宽度-->
<style type="text/css"> 
.tabwidth{
	width:30px;
}
textarea{ 
	resize:none; 
	width:400px; 
	height:100px;
}
#rechange{
	display: none;
}

</style>
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>查看上报耗材</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;
	</i> 首页 <span class="c-gray en">&gt;</span>  耗材管理<span class="c-gray en">&gt;</span> 查看上报耗材
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>

<div class="page-container">
	<div class="cl pd-5 bg-1 bk-gray mt-20 revise" style="display:none"> 
		<span>
			<a href="javascript:;"  id="reBut" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe6df;</i>修改</a>
		</span>
	</div>
	<form action="{:U('Order/doupbao')}" method="post">
		<!--隐藏的耗材展示框-->
		<div class="" style="display:none;">;
			<image src="__PUBLIC__/image/test.jpg" style="width:300px;" />
		</div>
		<!--end隐藏的耗材展示框-->
		<div class="mt-20">
			<h2 class="text-c">{$order.datetime|date="Y年m月",###} &nbsp;{$Think.session.ses.branchname}耗材上报一览</h2>
			<span style="color:#F00; font-size:15px;">每月21日前可上报、修改当月耗材</span>		
			<table class="table table-border table-bordered table-hover table-bg table-sort" style="margin-top: 20px; ">
				<input type="hidden" name="oid" value="{$order.oid}">
				<thead>
					<tr class="text-c">
						<th width="7%">上报时间</th>
						<th width="10%">耗材名称</th>
						<!--遍历耗材名称-->
						<volist name="goodsList" id="vo">
							<th width="30">{$vo.goodsname}</th>	
						</volist>
						<!-- end-->
						<th width="10%">总计</th>
					</tr>
				</thead>
				<tbody>
					<tr class="text-c">
						<td rowspan="3">{$order.ym}</td>
						<td width="10%">单价</td>
					<!--遍历耗材价格-->
						<volist name="order.goodsList" id="vo">
							<td>{$vo.price}</td>
						</volist>
					<!--end遍历耗材价格-->
						<td></td>
					</tr>
					<tr class="text-c">
						<td>上报数量</td>
					<!--遍历耗材数量-->
						<volist name="order.goodsList" id="vo">
							<input type="hidden" name="gid[]" value="{$vo.gid}">
							<td class="goodsnum">
								<input  type="hidden" name="num[]" value="{$vo.num}" class="tabwidth" oninput="value=value.replace(/[^\d]/g,'')" >
								<span>{$vo.num}</span> 
							</td>
						</volist>
					<!--end遍历耗材数量-->
						<td>
							
						</td>
					</tr>					
					<tr class="text-c">
						<td>小计</td>
					<!--遍历耗材价格-->
						<volist name="order.goodsList" id="vo">
							<td>{$vo.total}</td>
						</volist>
					<!--end遍历耗材价格-->
						<td>{$order.totalAll}</td>
					</tr>
				</tbody>	
			</table>
		</div>
		<div class="mt-20" >
	
		</div>
		<div class="mt-20">
			<textarea id="reviseCom" name="comm" placeholder="" disabled="disabled" >{$order.comm}</textarea>
			<button class="btn btn-success" id="rechange"  type="submit">确认修改</button>
		</div>
	</form>		
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="__PUBLIC__/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->

<script type="text/javascript">	

	$(document).ready(function(){ 
		//获取服务器时间
		var nowtime = new Date($.ajax({type:'HEAD',async: false}).getResponseHeader("Date"));
		//获取 当前是几号
		var mon = nowtime.getDate();

		if (mon <= 21) {
			$('.revise').show();			
		}

	//修改订单按钮 方法
	$('#reBut').click(function () {
		if (mon <= 21) {
			$('.goodsnum').find("input").removeAttr('type');
			$('.goodsnum').find("span").hide();
			$('#rechange').show();
			$('#reviseCom').removeAttr('disabled');
		}else{
			alert('已过本月 21 号不能修改！')
		}
	})
});	
</script>
</body>
</html>